package com.service.impl;

import com.entity.Record;
import com.dao.RecordMapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.service.IRecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zgg
 * @since 2021-08-24
 */
@Service
public class RecordServiceImpl extends ServiceImpl<RecordMapper, Record> implements IRecordService {

    @Override
    public PageInfo<Record> showRecordsAndSName(Integer pageNum, Integer pageSize, String name, String sName) {
        PageHelper.startPage(pageNum,pageSize);
        List<Record> records = baseMapper.selectRecordsAndSName(name, sName);
        return new PageInfo<>(records);
    }
}
